package com.xja.service.impl;

import org.apache.dubbo.config.annotation.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Resource;
import com.xja.entity.Users;
import com.xja.mapper.UsersMapper;
import com.xja.service.UsersService;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author 周广瑞
 * @date  2022/4/14 9:53
 * 
 */
@Service
public class UsersServiceImpl implements UsersService{
    private Logger logger = LoggerFactory.getLogger(UsersServiceImpl.class);



    @Resource
    private UsersMapper usersMapper;
    @Transactional(readOnly = true)
    @Override
    public Users selectUser(String loginname) {
        logger.info("验证登录账户"+loginname);
        return usersMapper.selectUser(loginname);
    }
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return usersMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Users record) {
        return usersMapper.insert(record);
    }

    @Override
    public int insertSelective(Users record) {
        return usersMapper.insertSelective(record);
    }

    @Override
    public Users selectByPrimaryKey(Integer id) {
        return usersMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Users record) {
        return usersMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Users record) {
        return usersMapper.updateByPrimaryKey(record);
    }



}
